This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Saving the entire URL on the Repository Widgets#401
Merged
guimafelipe merged 3 commits intomainfrom Jun 10, 2024
Merged
Conversation
krschau
approved these changes
Jun 7, 2024
dhoehna
reviewed
Jun 10, 2024
|
|
||
| // If the user changed the URL after clicking submit and clicked | ||
| // saved just after, we change it back to what was before to not corrupt our saved data. | ||
| private void CorrectUrl() |
Contributor
There was a problem hiding this comment.
The comments sound like a race-condition. What is happening between "Submit" and "Save"?
Collaborator
There was a problem hiding this comment.
They are separate buttons in the widget, so unlikely that the user could click them both fast enough to cause an issue.
dhoehna
approved these changes
Jun 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the pull request
When the widget was being saved, we changed the data to include only the main URL, without the query. This created a bug when if the user customized the widget but cancelled the process, the widget would lose track of its query because it was not being saved on the
ConfigurationData. With this PR, we never change the actual URL that the user used as input, keeping it consistent.This PR also fixes the issue where we could save widgets with invalid URLs. This would happen if the user submit a URL, change it for some reason, and then save the widget. As the save action also gets data (important to get the last title input for example), we need to correct it to the URL we are sure is correct.
References and relevant issues
Detailed description of the pull request / Additional comments
Validation steps performed
PR checklist